package com.shengyuan.manage_os.ui;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.shengyuan.manage_os.R;
import com.shengyuan.manage_os.adapter.MomentsAdapter;
import com.shengyuan.manage_os.base.NetworkActivity;
import com.shengyuan.manage_os.utils.DataSharedPress;

/**
 * Created by Administrator on 2016/11/18.
 */

public class MomentsActivity extends NetworkActivity {

    private ListView listView;
    private TextView go_back,menu_more;
    private LinearLayout dynamic;
    private DataSharedPress sharedPress;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置状态栏为透明
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        setContentView(R.layout.activity_moments);
        sharedPress = DataSharedPress.getSharedPress(this);
        listView = (ListView) findViewById(R.id.fragment_content);
        listView.setAdapter(new MomentsAdapter(this));
        go_back = (TextView) findViewById(R.id.go_back);
        menu_more = (TextView) findViewById(R.id.menu_more);
        dynamic = (LinearLayout) findViewById(R.id.main_dynamic);
        dynamic.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MomentsActivity.this,SendDynaActivity.class);
                startActivity(intent);
            }
        });
        go_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        sharedPress.putString("text","");
    }
}
